package com.jmx.yp.util;

/**
 * 
 * 功能描述：
 *			工具类
 * @author Jenny
 *
 * Date:2011-2-13 下午10:07:32
 */
public class Tools {
	/**
	 * 计算总页数
	 * @param totalRecords
	 * @param pagesize
	 * @return
	 */
	public static int computeTotalPage(int totalRecords, int pagesize){
		if(pagesize == 0)
			return 0;
		
		int totalPage = totalRecords / pagesize;
		if(totalRecords % pagesize > 0)
			totalPage += 1;
		
		return totalPage;
	}
}
